import { useEffect, memo } from "react"

const MyUseCallback = memo(({ getInfo }) => {
  useEffect(() => {
    console.log('MyUseCallback props改变是，执行了 useEffect().');
  })
  return (
    <div>
      <h1>MyUseCallback 自组件案例：</h1>
      <button type="button" onClick={() => {
        getInfo()
      }}>调用getInfo()</button>
    </div>
  )
})

export default MyUseCallback